import request from '@/utils/request'

export function downTaskFile(params){
    return request({
        url: '/file/download',
        method: 'post',
        params: params,
        responseType: 'blob',
    })
}

export function downSubTaskFile(data){
    return request({
        url: '/file/download',
        method: 'post',
        data: data,
        responseType: 'blob',
    })
}

export function download(url){
    return request({
        url: url,
        method: 'get',
        responseType: 'blob',
    })
}

export function downZip(data){
    return request({
        url: '/file/downFiles',
        method: 'post',
        data: data,
        responseType: 'blob',
    })
}

export function uploadTask(data){
    return request({
        url: '/task/upload',
        method: 'post',
        data: data,
        //content: 'multipart/form-data'
    })
}

export function getFileUrl(params){
    return request({
        url: '/file/getFileUrl',
        method: 'post',
        params: params
    })
}